﻿using Microsoft.EntityFrameworkCore;
using Abp.Zero.EntityFrameworkCore;
using SW.YUNCMS.Authorization.Roles;
using SW.YUNCMS.Authorization.Users;
using SW.YUNCMS.MultiTenancy;
using SW.YUNCMS.CMS;
namespace SW.YUNCMS.EntityFrameworkCore
{
    public class YUNCMSDbContext : AbpZeroDbContext<Tenant, Role, User, YUNCMSDbContext>
    {
        /* Define a DbSet for each entity of the application */
        public DbSet<Goods> Goods { get; set; }
        public DbSet<GoodsType> GoodsType { get; set; }
        public YUNCMSDbContext(DbContextOptions<YUNCMSDbContext> options)
            : base(options)
        {
           
        }
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Goods>().ToTable("Goods", "CMS");
            base.OnModelCreating(modelBuilder);
        }
    }
}
